import {HTTP} from '@/utils/HTTP.js'
import {useState, useEffect} from "react";

// 异步请求频道数据
const useLogItems = () => {
    const [logList, setLogList] = useState([])

    useEffect(() => {

        async function getLogList() {
            const res = await HTTP({
                url: '/log/items',
                method: 'GET'
            })
            setLogList(res.data)
        }

        getLogList()

    }, [])

    return {logList}
}

export default useLogItems